<template>
  <div>
    <van-nav-bar left-arrow class="heade-input" @click-left='$router.go(-1)'>
      <template #right>
        <van-icon name="map-marked" size="18" />
      </template>
      <template #title>
        <van-search
          v-model="value"
          placeholder="请输入小区或地址"
          @search="onSearch"
          background="#fff"
          class='search'
        >
          <!-- <template #action class="action">
            <div @click="onSearch">搜索</div>
          </template> -->
          <template #left>
            <div @click="arrow - down" class="left-icon">
              上海
              <van-icon name="arrow-down" color="black" size="10" />
            </div>
          </template>
        </van-search>
      </template>
    </van-nav-bar>
    <van-dropdown-menu>

      <FindZu></FindZu>

      <FindItem v-for='item in list' :key='item.houseCode' :item='item' ></FindItem>
    </van-dropdown-menu>
  </div>
</template>

<script>
import FindZu from "@/components/findzujian.vue";
import {houseList} from '@/api/users'
export default {
  name: "FindPage",
  components: {
    FindZu,
  },
  props: {},
  data() {
    return {
      value: "",
      list:[],
    };
  },
  computed: {},
  watch: {},
 async  created() {
    const {body}=await houseList( )
    console.log(body);
    this.list=[...this.list,...body.list]
    
  },
  methods: {
    onSearch() {},
  },
};
</script>

<style scoped lang="less">
.heade-input {
  background-color: #1cb676;
  .van-search{
    padding:0px;
  }
    .left-icon {
      border-right:3px solid black;
      height: 45px;
      line-height: 45px;
      color: black;
      font-size: 10px;
      background-color: #fff;
      height: 34px;
      line-height: 34px;
      border-right: 0px;
      
    }
  }

</style>
